package lovo.practice_7_14.frame;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class LoginPanel extends JPanel implements ActionListener {
    private J189_7_14 frame;
    private JButton jButtonLogin;
//    private Icon ImageLogin = Util.getimagesIcon("/Images/buttonLand.jpg");

    public LoginPanel(J189_7_14 frame) {
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);
        jButtonLogin = new JButton("欢迎你");
        jButtonLogin.setFont(new Font("宋",Font.BOLD,20));
        jButtonLogin.setBounds(400, 500, 140, 50);
        this.add(jButtonLogin);
        jButtonLogin.addActionListener(this);

    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (jButtonLogin == e.getSource()) {
            frame.switchPanel("scan");
        }
    }
}
